Define the new/0 function that takes no arguments and returns an empty list.
Define the add/2 function that takes 2 arguments (a language list and a string literal of a language). It should return the resulting list with the new language prepended to the given list.
Define the remove/1 function that takes 1 argument (a language list). It should return the list without the first item. Assume the list will always have at least one item.
Define the first/1 function that takes 1 argument (a language list). It should return the first language in the list. Assume the list will always have at least one item.
Define the count/1 function that takes 1 argument (a language list). It should return the number of languages in the list.
Define the functional_list?/1 function which takes 1 argument (a language list). It should return a boolean value. It should return true if "Elixir" is one of the languages in the list.
https://exercism.org/tracks/elixir/exercises/language-list
defmodule LanguageList do
def new() do
[]
end
def add(list, language) do
[language | list]
end
def remove(list) do
[_ | tail] = list
tail
end
def first(list) do
[head | _] = list
head
end
def count(list) do
length list
end
def functional_list?(list) do
"Elixir" in list
end
end